import { WinKeyboardEnums, MacKeyboard, KeyboardEnums } from "@/enums/keyboardEnums"
const winCtrlMerge = (cmd: string) => `${WinKeyboardEnums.CTRL} + ${cmd}`
const winShiftMerge = (cmd: string) => `${WinKeyboardEnums.SHIFT} + ${cmd}`

export const winKeyboardMap = {
  [KeyboardEnums.ARROW_DOWN]: winCtrlMerge(KeyboardEnums.ARROW_DOWN),
  [KeyboardEnums.ARROW_LEFT]: winCtrlMerge(KeyboardEnums.ARROW_LEFT),
  [KeyboardEnums.ARROW_RIGHT]: winCtrlMerge(KeyboardEnums.ARROW_RIGHT),
  [KeyboardEnums.ARROW_UP]: winCtrlMerge(KeyboardEnums.ARROW_UP),
  [KeyboardEnums.DELETE]: winCtrlMerge(KeyboardEnums.DELETE),
  [KeyboardEnums.COPY]: winCtrlMerge(KeyboardEnums.COPY),
  [KeyboardEnums.CUT]: winCtrlMerge(KeyboardEnums.CUT),
  [KeyboardEnums.PARSE]: winCtrlMerge(KeyboardEnums.PARSE),
  [KeyboardEnums.TOP]: winCtrlMerge(KeyboardEnums.TOP),
  [KeyboardEnums.BOTTOM]: winCtrlMerge(KeyboardEnums.BOTTOM),
  [KeyboardEnums.SAVE]: winCtrlMerge(KeyboardEnums.SAVE),
}

const macCtrlMerge = (cmd: string) => `${MacKeyboard.CTRL} + ${cmd}`
const macShiftMerge = (cmd: string) => `${MacKeyboard.SHIFT} + ${cmd}`
export const macKeyboardMap = {
  [KeyboardEnums.ARROW_DOWN]: macCtrlMerge(KeyboardEnums.ARROW_DOWN),
  [KeyboardEnums.ARROW_LEFT]: macCtrlMerge(KeyboardEnums.ARROW_LEFT),
  [KeyboardEnums.ARROW_RIGHT]: macCtrlMerge(KeyboardEnums.ARROW_RIGHT),
  [KeyboardEnums.ARROW_UP]: macCtrlMerge(KeyboardEnums.ARROW_UP),
  [KeyboardEnums.DELETE]: macCtrlMerge(KeyboardEnums.DELETE),
  [KeyboardEnums.COPY]: macCtrlMerge(KeyboardEnums.COPY),
  [KeyboardEnums.CUT]: macCtrlMerge(KeyboardEnums.CUT),
  [KeyboardEnums.PARSE]: macCtrlMerge(KeyboardEnums.PARSE),
  [KeyboardEnums.TOP]: macCtrlMerge(KeyboardEnums.TOP),
  [KeyboardEnums.BOTTOM]: macCtrlMerge(KeyboardEnums.BOTTOM),
  [KeyboardEnums.SAVE]: macCtrlMerge(KeyboardEnums.SAVE),
}

const macKeyList: Array<string> = [
  KeyboardEnums.ARROW_DOWN,
  KeyboardEnums.ARROW_LEFT,
  KeyboardEnums.ARROW_RIGHT,
  KeyboardEnums.ARROW_UP,
  KeyboardEnums.DELETE,
  KeyboardEnums.COPY,
  KeyboardEnums.CUT,
  KeyboardEnums.PARSE,
  KeyboardEnums.TOP,
  KeyboardEnums.BOTTOM,
  KeyboardEnums.SAVE,
]

export const useAddKeyboard = () => {
  
}